#include <REGX52.H>


	


unsigned int n = 0;
unsigned int i = 0;
char m = 0x01;
void main()
{
	TMOD = 0x01;
	TH0 = (65536 - 10000) / 255;
	TL0 = (65536 - 10000) % 255;
	TR0 = 1;
	
	while(1)
	{
		m = 0x01;
		for(n = 0; n <= 7; n++)
		{
			P2 = ~m;
			while(i < 10)
			{
				while(TF0 ==0);
				TH0 = (65536 - 10000) / 256;
				TL0 = (65536 - 10000) % 256;
				TF0 = 0;
				i++;
			}
			i = 0;
					
			m = m << 1;
		}
	}


}


